//
//  Singleton.m
//  SmileRead
//
//  Created by dllo on 15/8/25.
//  Copyright (c) 2015年 JIZ. All rights reserved.
//

#import "Singleton.h"

static Singleton *share = nil;

@implementation Singleton

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self createPlayer];
    }
    return self;
}

- (void)createPlayer
{
    self.player = [[AVPlayer alloc] init];
}

+ (Singleton *)defaultSingleton
{
    @synchronized(self)
    {
        if (!share) {
            share = [[Singleton alloc] init];
        }
    }
    return share;
}

@end
